import requests
import json

url='https://www.cwl.gov.cn/cwl_admin/front/cwlkj/search/kjxx/findDrawNotice?name=ssq&pageNo=1&pageSize=30&systemType=PC'

head={
"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
}
res=requests.get(url,headers=head)

red_count={}

data=json.loads(res.text)
for item in data["result"]:
    red_list=item["red"].split(',')
    print(red_list)
    for i in red_list:
        if i in red_count:
            red_count[i]+=1
        else:
            red_count[i]=1
print(red_count)